﻿@model Achievement.DataModels.Users
@{
    ViewBag.Title = "EditInfo";
}
@section LayoutHeadContainer{
<link href="/css/jquery-ui-1.10.2.custom.css" rel="stylesheet">
<script src="/js/jquery-1.9.1.js"></script>
<script src="/js/jquery-ui-1.10.2.custom.js"></script>
<script>
    $(function () {
        $("#tabs").tabs();
        $("#button").button();
    });
    function checkempty() {
        var result = true;
        $(".ckempty").each(function () {
            if ($(this).val() == "") {
                $(this).next("span").text(" 值不能为空！");
                result = false;
            }
        });
        if ($("#txtNP").val() != $("#txtCNP").val()) {
            $("#txtCNP").next("span").text(" 确认密码不一致！");
            result = false;
        }
        return result;
    }
</script>
}
<div id="middle-sdo1">
  <div id="middle">
    <!--Message-->
    <div class="message">北京电力工程公司成果库系统欢迎您！</div>
    <!--Feature Box-->
    <div style="text-align:right;padding-bottom:5px">
    
    </div>
    <div id="tabs" style=" text-align:center">
	    <ul>
		    <li><a href="#tabs-1">个人资料</a></li>
	    </ul>
	    <div id="tabs-1" style="text-align:center; margin-left:auto;">
        @using (Html.BeginForm("EditPwd", "Users", FormMethod.Post, new { id = "form", onsubmit = "return checkempty()" }))
        {
            <table width="500px" style="margin-left:auto; margin-right:auto; line-height:40px">
                <tr>
                    <td style="text-align:right;">
                        <h5>原密码：</h5>
                    </td>
                    <td style="text-align:left;">
                        @Html.TextBox("txtOP","", new { @class = "ckempty" })
                        @Html.HiddenFor(model=>model.ID)
                        <span style=" color:Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right;">
                        <h5>新密码：</h5>
                    </td>
                    <td style="text-align:left;">
                        @Html.TextBox("txtNP", "", new { @class = "ckempty" })
                        <span style=" color:Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right;">
                        <h5>确认密码：</h5>
                    </td>
                    <td style="text-align:left;">
                        @Html.TextBox("txtCNP", "", new { @class = "ckempty" })
                        <span style=" color:Red">*</span>
                    </td>
                </tr>
            </table>
            }
        </div>
        <button id="button" onclick="$('form').submit()">保存</button>
        <br />
        <br />
        <br />
    </div>
    
  </div>
</div>